<?php

namespace App\Http\Requests\Api;

use Illuminate\Foundation\Http\FormRequest;

class ArticleRequest extends FormRequest
{
    public function rules()
    {
        return [
//            'images' => 'required',
            'title' => 'required',
            'content' => 'required',
            'tag_id' => 'nullable|integer'
        ];
    }

    public function messages()
    {
        return [
//            'images.required' => '文件必填',
            'title.required' => '标题必填',
            'content.required' => '评论内容必填',
//            'content.max' => '评论内容字数不能超过500个字',
            'tag_id.required' => '标签不能为空',
        ];
    }
}
